<template>
	<div style="background-color: #f6f6f6;">
		<top-nav bgColor="white" title="授权单"  btnName="授权"  :rightShow="true" returnPath="factoryList"  @fatherDo="goAddBills"></top-nav>
		<div style="width: 100%;height: 3rem;"></div>
	<div v-show="isList" class="" style="width: 100%;height: 100%; position:fixed;left:0;top:0;background-color: rgba(0,0,0,0.1);display: flex;justify-content: center;align-items: center;z-index: 350;">
		<mu-circular-progress :size="24" color="green500"/>
	</div>
		
		<card-item v-for="item in list" 
			:key ="item"
			:BillNo="item.BillNo"
			:CarNo="item.CarNo"
			:CustomName="item.CustomName"
			:ID="item.ID"
			:ItemID="item.ItemID"
			:ItemName="item.ItemName"
			:QtyPln="item.QtyPln"
			:EmpRht="item.EmpRht"
			:Step="item.Step"
			:DeliveryCode="item.DeliveryCode"
			@sendParam="sendNextParam(item)"></card-item>
	</div>
</template>

<script>
	 import TopNav from '@/components/nav/topNav.vue'
	 import CardItem from '@/page/project/A01/menuChild/laddingBills/addBills/cardItem.vue'
	 export default {
		components: {
		      TopNav,
		      CardItem
		},
		data(){
			return{
				list:[
//				{
//					BillNo:"",
//					BusinessUnit:{
//						Name:""
//					},
//					CarNumber:"",
//					PassWord:"",
//					ItemName:"",
//					FID:"",
//					PreLoad:""
//				},

				],
				isList:true,
				uid:'',
				factoryInfo:{}
			}
		},
		mounted(){
//			this.factoryInfo=JSON.parse(localStorage.factoryInfo)
//			console.info(this.factoryInfo)
			this.getAllTask()
		},
		methods:{
			getAllTask(){
				let that=this
				that.axios.post('/A01/getAllTask',{
					'factoryId':localStorage.factoryId,
					'uid':localStorage.uid,
					'currentpage':1
				}).then(function(response){
					console.info(response.data.data)
					that.list=response.data.data.list
					that.isList=false
				}).catch(function(error){
					that.isList=false
				})
			},
			goAddBills(){
				let that=this
				that.$router.push({
//					path:'/hongchangOrderListForAddBill'
					path:'/hongchangAddGrantBillAccountFirst'
				})
			},
			sendNextParam(data){
				let that=this
				that.$router.push(
			 		{
			 			path:'hongchangOrderDetail',
			 			name:'hongchangOrderDetail',
					 params:{
					 	bill:data
					 }
					 })
			}
		}
	 }
</script>

<style>
</style>